1. Technical Field
Aspects described herein relates to a communication apparatus and a communication method, and a computer-readable medium storing computer-readable instructions for measuring network bandwidth when communicating via a network.
2. Description of the Related Art
When a communication apparatus transmits and receives data through the Internet or another network, a transfer speed of data needs to be suitable to an available bandwidth. The available bandwidth for example, bits per second (bps), varies depending on a region, or a provider, or a time zone, or other situations. The available bandwidth indicates an amount of data that the communication apparatus can transfer in a unit time via the network. Therefore, it is preferable for the communication apparatus that sends data to control the amount of data to be transferred in the unit time (bps) according to the varying available bandwidth. If the transfer speed of the data is equal to or lower than the available bandwidth, data congestion, or a packet loss, or other problems are less likely to occur.
In a related art, a measurement method is disclosed. The measurement method measures the varying available bandwidth while voice data and other media data are being transmitted and received among the communication apparatuses. In the conventional measurement method, a transmitting communication apparatus which transmits data first sets a search range. The search range indicates a search range of network bandwidth to measure the available bandwidth. The transmitting communication apparatus sets conditions under which a plurality of packets is transmitted to measure bandwidths within the set search range. The transmitting communication apparatus then transmits the plurality of packets to a receiving communication apparatus. Each of the plurality of packets includes time information in order to enable the receiving communication apparatus to calculate a packet transmission interval. The transmitting communication apparatus transmits the plurality of packets at the transmission interval in succession as the transmission interval is changed by the transmitting communication apparatus. The receiving communication apparatus records packet reception intervals. After that, a packet transmission interval calculated from the time information in the packet is determined. The reception interval recorded by the receiving communication apparatus is also determined. The difference between the packet transmission interval and the packet reception interval is calculated. A current bandwidth is measured from a tendency of changes in a plurality of calculated differences. Once a procedure of measuring the available bandwidth is finished, the next bandwidth search range is set on the basis of previous measurement results, and after that, the next measurement processing starts.